package org.dromara.hm.enums;

import jakarta.validation.constraints.NotBlank;

/**
 *  待办类型
 * @Author If404 Hzy
 * @Date 2025-2025/3/11-10:14
 * @Version 1.0
 */
public enum ToDoTypeEnum
{
    RETURN_VISIT(0, "回访"),
    RECEIPT(1, "跨店入库"),
    AUTO_RECEIPT(8, "自增入库"),
    HOLIDAY(2, "节日祝福"),
    THRESHOLD(3, "阈值"),
    EMPLOYEE_BENEFITS(4, "员工福利发放"),
    CUSTOMER_GIFTS(5, "客户赠品发放"),
    SALE_ORDER_REFUND(6, "退款退货"),
    FRINGE_MARKET(7, "外围市场"),
    PAYMENT_ADJUSTMENT(9, "回款调整"),
    ;

    private final int code;
    private final String description;

    ToDoTypeEnum(int code, String description) {
        this.code = code;
        this.description = description;
    }

    public String getCode() {
        return code+"";
    }

    public String getDescription() {
        return description;
    }

    public static ToDoTypeEnum getByCode(int code) {
        for (ToDoTypeEnum type : values()) {
            if (type.code == code) {
                return type;
            }
        }
        return null;
    }
}
